import {merge} from 'lodash'

const baseOpt = () => {
    const colors = ['#5470C6', '#91CC75', '#ea3d3d'];
    let option = {
        color: colors,
        tooltip: {
            trigger: 'item'
            // axisPointer: {
            //     type: 'cross'
            // }
        },
        dataZoom: [{
            minValueSpan: 5,
            maxValueSpan: 5,
            type: "inside",
            xAxisIndex: [0, 1, 2] // 表示这个 dataZoom 组件控制 第一个 和 第三个 yAxis
        }],
        grid: {
            right: 50,
            left: 10,
            bottom: 0,
            top: 40,
            containLabel: true,
        },
        legend: {},
        xAxis:
            {
                type: 'category'
            }
        ,
        yAxis:
            {
                type: 'value',
                name: '标题'
            }
        ,
        series:
            {
                type: 'bar',
                barMaxWidth: 20,
                // yAxisIndex: 1,
                showBackground: false,
                label: {
                    show: true,
                    formatter: '{c}',
                    color: '#ffffff'
                },
                itemStyle: {
                    // borderRadius: 100
                },
                data: [0, 0, 0, 0, 0]
            }
    }
    return option
}

